import request from '@/utils/request'
//获取类目列表
export function selectCategory (params) {
  return request({
    url: '/umsAdminCategoryAttribute/selectCategory',
    method: 'get',
  })
}
//新增分类
export function saveCategory (params) {
  return request({
    url: '/umsAdminCategoryAttribute/saveCategory',
    method: 'post',
    data:params
  })
}
//编辑分类
export function updateCategory (params) {
  return request({
    url: '/umsAdminCategoryAttribute/updateCategory',
    method: 'PUT',
    data:params
  })
}
//删除分类
export function deleteCategory (params) {
  return request({
    url: '/umsAdminCategoryAttribute/deleteCategory',
    method: 'DELETE',
    params:params
  })
}
//获取属性
export function selectAttributeByCategoryId (params) {
  return request({
    url: '/umsAdminCategoryAttribute/selectAttributeByCategoryId',
    method: 'get',
    params:params
  })
}
//新增属性
export function saveAttribute (params) {
  return request({
    url: '/umsAdminCategoryAttribute/saveAttribute',
    method: 'post',
    data:params
  })
}
//获取全部属性
export function selectAttributePage (params) {
  return request({
    url: '/umsAdminCategoryAttribute/selectAttributePage',
    method: 'get',
    params:params
  })
}
//编辑属性
export function updateAttribute (params) {
  return request({
    url: '/umsAdminCategoryAttribute/updateAttribute',
    method: 'put',
    data:params
  })
}
//删除属性
export function deleteAttribute (params) {
  return request({
    url: '/umsAdminCategoryAttribute/deleteAttribute',
    method: 'DELETE',
    params:params
  })
}
//获取类目下的所有属性
export function selectAllCategoryByCategoryId (params) {
  return request({
    url: '/umsAdminCategoryAttribute/selectAllCategoryByCategoryId',
    method: 'GET',
    params:params
  })
}
//绑定类目属性
export function bindingCategoryAndAttribute (params) {
  return request({
    url: '/umsAdminCategoryAttribute/bindingCategoryAndAttribute',
    method: 'POST',
    params:params
  })
}
//获取首页分类
export function selectCategorysY(params) {
  return request({
    url: '/umsAdminCategoryIndexController/selectCategory',
    method: 'get',
    params:params
  })
}
//新增分类
export function saveCategoryHome(params) {
  return request({
    url: '/umsAdminCategoryIndexController/saveCategory',
    method: 'post',
    data:params
  })
}
//编辑分类首页
export function updateCategoryHome(params) {
  return request({
    url: '/umsAdminCategoryIndexController/updateCategory',
    method: 'PUT',
    data:params
  })
}
//删除首页分类
export function deleteCategoryHome(params) {
  return request({
    url: '/umsAdminCategoryIndexController/deleteCategory',
    method: 'DELETE',
    params:params
  })
}